package com.ruoyi.system.domain;

import com.ruoyi.common.core.domain.MyBaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户会话关联对象 user_session_relation
 * 
 * @author ruoyi
 * @date 2025-09-23
 */
public class UserSessionRelation extends MyBaseEntity {
    private static final long serialVersionUID = 1L;

    /** 关联记录ID */
    private String id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 未读消息数量 */
    @Excel(name = "未读消息数量")
    private Integer unreadCount;

    /** 会话ID，关联会话表 */
    @Excel(name = "会话ID，关联会话表")
    private String sessionId;

    /** 是否置顶（1=置顶，0=正常） */
    @Excel(name = "是否置顶", readConverterExp = "1==置顶，0=正常")
    private Integer isTop;

    /** 是否免打扰（0=正常提醒，1=免打扰） */
    @Excel(name = "是否免打扰", readConverterExp = "0==正常提醒，1=免打扰")
    private Integer isMuted;

    /** 是否删除（0=未删除，1=已删除） */
    @Excel(name = "是否删除", readConverterExp = "0==未删除，1=已删除")
    private Integer isDeleted;

    /** 版本号，用于乐观锁 */
    @Excel(name = "版本号，用于乐观锁")
    private Long version;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private String creator;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }



    public void setSessionId(String sessionId) 
    {
        this.sessionId = sessionId;
    }

    public String getSessionId() 
    {
        return sessionId;
    }

    public Integer getUnreadCount() {
        return unreadCount;
    }

    public void setUnreadCount(Integer unreadCount) {
        this.unreadCount = unreadCount;
    }

    public Integer getIsTop() {
        return isTop;
    }

    public void setIsTop(Integer isTop) {
        this.isTop = isTop;
    }

    public Integer getIsMuted() {
        return isMuted;
    }

    public void setIsMuted(Integer isMuted) {
        this.isMuted = isMuted;
    }

    public void setIsDeleted(Integer isDeleted)
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted()
    {
        return isDeleted;
    }

    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    public void setCreator(String creator) 
    {
        this.creator = creator;
    }

    public String getCreator() 
    {
        return creator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("unreadCount", getUnreadCount())
            .append("sessionId", getSessionId())
            .append("isTop", getIsTop())
            .append("isMuted", getIsMuted())
            .append("isDeleted", getIsDeleted())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("creator", getCreator())
            .toString();
    }
}
